package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CustomerMapper;
import com.ruoyi.system.domain.Customer;
import com.ruoyi.system.service.ICustomerService;

/**
 * 顾客信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
@Service
public class CustomerServiceImpl implements ICustomerService 
{
    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public List<Customer> customerList(Customer customer) {
        return customerMapper.customerList(customer);
    }

    @Override
    public Customer getCustomerByid(Long customerId) {
        return customerMapper.getCustomerByid(customerId);
    }

    @Override
    public boolean addCustomer(Customer customer) {
        return customerMapper.addCustomer(customer)==1?true:false;
    }

    @Override
    public boolean updateCustomer(Customer customer) {

        return customerMapper.updateCustomer(customer)==1?true:false;
    }

    @Override
    public boolean deleteCustomerById(Long customerId) {
        return customerMapper.deleteCustomerById(customerId)==1?true:false;
    }

}
